import { getBannerAPI } from "@/apis/home";
import type { Picture } from "@/types/home/home";
import { onMounted, ref } from "vue";

export function useBanner() {
  const bannerList = ref<Picture[]>([]);
  const getBanner = async () => {
    const res = await getBannerAPI({ distributionSite: "2" });
    bannerList.value = res.data.result;
  };
  onMounted(() => {
    getBanner();
  });

	return{
		bannerList
	}
}
